package com.cenxi.controller;

import com.cenxi.service.SendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author cenxi
 * @Date 2023/9/6 16:13
 * @Version 1.0
 */
@RestController
@RequestMapping("/send")
public class SendController {

    @Autowired
    private SendService sendService;

    @GetMapping("/email/{emailNum}")
    public Object email(@PathVariable("emailNum") String emailNum) {
        return sendService.email(emailNum);
    }

    @GetMapping("/sms/{smsNum}")
    public Object sms(@PathVariable("smsNum") String smsNum) {
        return sendService.sms(smsNum);
    }
}
